<template>
    <div>
        <div class="prism-player" id="J_prismPlayer"></div>
        <remote-js src="https://g.alicdn.com/de/prismplayer/2.4.0/aliplayer-h5-min.js"></remote-js>
    </div>
</template>
<script>
export default {
    mounted() {
        let player = new Aliplayer({
            id: 'J_prismPlayer',
            autoplay: true,
            isLive: true,
            height: "100%",
            width: "100%",
            playsinline: true,
            source: "https://logos-channel.scaleengine.net/logos-channel/live/biblescreen-ad-free/playlist.m3u8",
            useH5Prism: true,
            useFlashPrism: false,
            cover: 'http://cdnoss.youkouyang.com/cover.png',
            //prismplayer 2.0.1版本支持的属性，主要用户实现在android 微信上的同层播放
            x5_type: 'h5', //通过 video 属性 “x5-video-player-type” 声明启用同层H5播放器，支持的值：h5 https://x5.tencent.com/tbs/guide/video.html
            x5_fullscreen: true,//通过 video 属性 “x5-video-player-fullscreen” 声明视频播放时是否进入到 TBS 的全屏模式，支持的值：true
        })
    },
    components: {
        'remote-js': {
            render(createElement) {
                return createElement('script', { attrs: { type: 'text/javascript', src: this.src } });
            },
            props: {
                src: { type: String, required: true },
            },
        },
    }
}
</script>